Resolves: tdf#123650 explicitly grab focus after modification
of the widget after gaining focus, otherwise gtk loses track
of where the focus should be
Change-Id: I90d9f36acf807aec8687c7f563449ef16d5eb574
Reviewed-on: https://gerrit.libreoffice.org/69355
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index b789337..2a51bc3 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -826,6 +826,9 @@
}
m_xPaperTrayBox->set_active_text(aOldName);
m_xPaperTrayBox->thaw();
// tdf#123650 explicitly grab-focus after the modification otherwise gtk loses track
// of there the focus should be
m_xPaperTrayBox->grab_focus();
}
IMPL_LINK_NOARG(SvxPageDescPage, PaperSizeSelect_Impl, weld::ComboBox&, void)
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 910c1cb..84f13af7c 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1255,11 +1255,12 @@
GtkWidget* m_pWidget;
GtkInstanceBuilder* m_pBuilder;
static void signalFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
static gboolean signalFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
{
GtkInstanceWidget* pThis = static_cast<GtkInstanceWidget*>(widget);
SolarMutexGuard aGuard;
pThis->signal_focus_in();
return false;
}
void signal_focus_in()
@@ -1267,11 +1268,12 @@
m_aFocusInHdl.Call(*this);
}
static void signalFocusOut(GtkWidget*, GdkEvent*, gpointer widget)
static gboolean signalFocusOut(GtkWidget*, GdkEvent*, gpointer widget)
{
GtkInstanceWidget* pThis = static_cast<GtkInstanceWidget*>(widget);
SolarMutexGuard aGuard;
pThis->signal_focus_out();
return false;
}
void signal_focus_out()